package com.sc.nft.exception;

import com.sc.nft.sup.ErrorCode;
import lombok.Data;

@Data
public class GlobalRunTimeException extends RuntimeException
{
    public ErrorCode errorCode;
    public String message;

    public GlobalRunTimeException(ErrorCode errorCode){
        this.errorCode = errorCode;
        this.message = errorCode.getMessage();
    }
    public GlobalRunTimeException(String message){
        this.message = message;
    }

    public GlobalRunTimeException(ErrorCode errorCode,String message){
        this.errorCode = errorCode;
        this.message = message;
    }

}
